home *** CD-ROM | disk | FTP | other *** search
- Path: info.uah.edu!oreo!gbacon
- From: gbacon@oreo (Greg Bacon)
- Newsgroups: comp.lang.c
- Subject: Re: atol or strtol ?
- Date: 14 Jan 1996 22:50:53 GMT
- Organization: The University of Alabama in Huntsville
- Message-ID: <4dc1cd$9ug@info.uah.edu>
- References: <4dbobq$763@jupiter.planet.net>
- NNTP-Posting-Host: oreo.aspire.cs.uah.edu
- X-Newsreader: TIN [version 1.2 PL2]
-
- Chris Kemp (chrisk@paladn.com) wrote:
- : what is the difference between strtol function and atol ?
-
- atol() takes a string representing a number which it assumes to be
- expressed in base-10 and returns the equivalent long. Dig page
- 251 of K&R II:
-
- "long atol(const char *s)
- converts s to long; it is equivalent to
- strtol(s, (char **) NULL, 10)."
-
- Check your compiler's docs for further info on strtol().
-
- Greg
- --
- Greg Bacon <gbacon@cs.uah.edu>
- University of Alabama in Huntsville
- CS Department Systems Support Team
-